import React from 'react';
import './header.less';
import {Link} from 'react-router-dom';
class Header extends React.Component {
  constructor (props) {
    super(props)
    this.state = {
     HeaderData:[
       {
         name:'首页',
         url:'/home'
       },{
        name:'列表',
        url:'/list'
      },{
        name:'关于我们',
        url:'/about'
      }
     ]
    }
  }
  render () {
    return (
      <div className="box">
        <ul>
            {
                this.state.HeaderData.map(function(val,index){
                    return(
                         <li key={index}>
                          <Link to={val.url}>
                            {val.name}
                          </Link>
                        </li>                      
                    )
                })
            }
        </ul>
        </div>
       
    )
  }
}

export default Header